﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CSW.Security
{
    /// <summary>
    /// Security_Role
    /// </summary>
    public partial class Security_Role
    {
        private Property<int> m_RoleID;
        private Property<string> m_Description;

        /// <summary>
        /// Called at the end of the constructor.
        /// </summary>
        protected override void base_OnCreated()
        {
            m_RoleID = new Property<int>(this, "RoleID");
            m_Description = new Property<string>(this, "Description");

            m_RoleID.IsReadOnly = true;

            m_Description.MaxLength = 30;

            AddRequiredField(m_Description, "Description is required.");
        }

        private void GeneratedOnRoleIDChanging(int value)
        {
            m_RoleID.CheckEdittable();
        }

        private void GeneratedOnDescriptionChanging(string value)
        {
            m_Description.CheckEdittable();
        }
    }
}
